package com.ysd.twocrm.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

//用户角色表（中间表）
@TableName(value = "userroles")//指定数据库表名
public class UserRoles {
    @TableId(value = "userRolesId",type = IdType.AUTO)
    private Integer userRolesId;//用户角色编号

    private Integer roleId;//角色编号

    private Integer userId;//用户编号

    private Integer userRolesWeight;//权重值

    private Integer parentIdStatus;//状态 用于区分是否拥有咨询老师

    public Integer getParentIdStatus() {
        return parentIdStatus;
    }

    public void setParentIdStatus(Integer parentIdStatus) {
        this.parentIdStatus = parentIdStatus;
    }

    public UserRoles(Integer userRolesId, Integer roleId, Integer userId, Integer userRolesWeight, Integer parentIdStatus) {
        this.userRolesId = userRolesId;
        this.roleId = roleId;
        this.userId = userId;
        this.userRolesWeight = userRolesWeight;
        this.parentIdStatus = parentIdStatus;
    }

    public Integer getUserRolesId() {
        return userRolesId;
    }

    public void setUserRolesId(Integer userRolesId) {
        this.userRolesId = userRolesId;
    }

    public Integer getRoleId() {
        return roleId;
    }

    public void setRoleId(Integer roleId) {
        this.roleId = roleId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getUserRolesWeight() {
        return userRolesWeight;
    }

    public void setUserRolesWeight(Integer userRolesWeight) {
        this.userRolesWeight = userRolesWeight;
    }

    @Override
    public String toString() {
        return "UserRoles{" +
                "userRolesId=" + userRolesId +
                ", roleId=" + roleId +
                ", userId=" + userId +
                ", userRolesWeight=" + userRolesWeight +
                ", parentIdStatus=" + parentIdStatus +
                '}';
    }

    public UserRoles() {
        super();
    }
}
